package org.example.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.example.service.AsyncService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

@Service
@Slf4j
public class AsyncServiceImpl implements AsyncService {
    @Override
    @Async
    public void test() throws InterruptedException {
        TimeUnit.SECONDS.sleep(5);
        log.debug("------------老子终于醒来了！-------------");
    }
}
